/*************************************************************************
	> File Name: P2440.cpp
	> Author: yufangze
	> Mail: 2224590123@qq.com
	> Created Time: 2025-06-23 15:38:32
 ************************************************************************/

#include <iostream>
#include <set>
#include <map>
#include <vector>
#include <algorithm>
using namespace std;

#define MAX_N 100000
int arr[MAX_N + 5];

bool check(int *arr, int n, int val, int k) {
    int cnt = 0;
    for (int i = 0; i < n; i++) {
        cnt += arr[i] / val;
    }
    return cnt >= k;
}

int solve(int *arr, int n, int len, int k) {
    int head = 1, tail = len, mid;
    while (tail - head > 3) {
        mid = head + (tail - head) / 2;
        if (check(arr, n, mid, k)) head = mid;
        else tail = mid - 1;
    }
    for (int i = tail; i >= head; i--) {
        if (check(arr, n, i, k)) return i;
    }
    return 0;
}

int main() {
    int n, k, max_len = 0;
    cin >> n >> k;
    for (int i = 0; i < n; i++) {
        scanf("%d", &arr[i]);
        max_len = max(max_len, arr[i]);
    }
    int res = solve(arr, n, max_len, k);
    cout << res << endl;
    return 0;
}
